package com.example.graduation.service.impl;

import com.example.graduation.dao.CompanyMapper;
import com.example.graduation.entity.Company;
import com.example.graduation.service.CompanyService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CompanyServiceImpl implements CompanyService {

    @Autowired
    private CompanyMapper companyMapper;

    @Override
    public List<Company> findAll() {
        return companyMapper.findAll();
    }

    @Override
    public Company findById(Integer enterpriseId) {
        return companyMapper.findById(enterpriseId);
    }

    @Override
    public int insert(Company company) {
        return companyMapper.insert(company);
    }

    @Override
    public int update(Company company) {
        return companyMapper.update(company);
    }

    @Override
    public int deleteById(Integer enterpriseId) {
        return companyMapper.deleteById(enterpriseId);
    }
} 